Skip to content

feat: add self-service Nuri Spaces - #8

Open
eminogrande wants to merge 2 commits into
mainfrom
feat/nuri-space-self-service
Open

feat: add self-service Nuri Spaces#8
eminogrande wants to merge 2 commits into
mainfrom
feat/nuri-space-self-service

Conversation

@eminogrande

Copy link
Copy Markdown

Summary

  • add NIP-98 and replay-protected hub APIs to list, create, and join Nuri Spaces
  • atomically make the authenticated signer the Space owner and bootstrap #general
  • support public discovery/direct join and private invite-only membership
  • add a Discord-style Space directory, create/join forms, Space rail, and per-Space relay switching
  • expose the server-confirmed bootstrap Channel so a new Space can immediately enter #general without server-side user impersonation

Security and tenancy

  • Space endpoints are available only on the canonical configured hub authority
  • GET and POST use their exact NIP-98 methods and URLs; POST requires payload binding
  • the request body never supplies an owner pubkey
  • create/join require an existing hub membership
  • public join rechecks visibility inside the DB insert
  • private Spaces stay absent from outsider directory results and continue through tenant-bound invite claim
  • exact Space host suffix: <slug>.relay.nuri.com

Verification

  • cargo fmt --all -- --check
  • cargo clippy -p buzz-db -p buzz-relay --all-targets -- -D warnings
  • Relay API unit tests: 2 passed
  • fresh PostgreSQL with migrations 0001-0025: successful
  • Space PostgreSQL integration tests: 8 passed, including owner quota, idempotency, private filtering, #general, and concurrent slug collision
  • pnpm run check
  • Web typecheck
  • Web unit tests: 13 passed
  • Web production build
  • Playwright smoke: 7 passed

Closes #4
Advances #5
Depends on #6 for canonical DNS/TLS deployment.

eminogrande added a commit that referenced this pull request Jul 29, 2026
The handover described a world with two chat implementations, a branch
ahead of main, and three overlapping PRs. All of that is resolved in this
PR, so the docs would have shipped stale in the same merge that made them
wrong.

Now records: main is the source of truth, how the chat reconciliation
went and what it deliberately left coexisting, that the deployed bundle
predates it, and that PR #8 needs a rebase before review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Emin Mahrt <emin@emin.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(relay): add Nuri self-service Spaces

1 participant